import axios from "../tools/require.js";

export function telLogin(data){
  return axios.post("/api/user/login/mobile", data);
}

export function idLogin(data){
  return axios.post("/api/user/login/idcard", data);
}

export function getSMS(data){
  return axios.post("/api/tools/sms", data);
}

export function getQuestion(data){
  return axios.get("/api/question", {
    params: data
  });
}

export function getQuestionDetail(i){
  return axios.get("/api/question/" + i, {
    params: {}
  });
}

export function getAnswer(data){
  return axios.get("/api/answer", {
    params: data
  });
}

export function addQuestion(data){
  return axios.post("/api/question/create", data);
}

export function setUser(data){
  return axios.put("/api/user/update", data);
}